﻿using System.Collections.Generic;
using System.Linq;
using NuGet.Server.DataServices;

namespace MayhemServer.Models {
    public class PackageDetails {
        public PackageDetails(IEnumerable<string> packageEvents, IEnumerable<string> packageReactions, IEnumerable<Package> history) {
            Package = history.FirstOrDefault(p => p.IsLatestVersion);
            PackageEvents = packageEvents;
            PackageReactions = packageReactions;
            History = history;
        }

        public Package Package { get; private set; }
        public IEnumerable<string> PackageEvents { get; private set; }
        public IEnumerable<string> PackageReactions { get; private set; }
        public IEnumerable<Package> History { get; private set; }
    }
}
